Skip to content

Fetch capability of mirror before configuring it#4089

Merged
qiluo-msft merged 6 commits intosonic-net:masterfrom
stephenxs:mirror_capability_check
Nov 17, 2025
Merged

Fetch capability of mirror before configuring it#4089
qiluo-msft merged 6 commits intosonic-net:masterfrom
stephenxs:mirror_capability_check

Conversation

@stephenxs
Copy link
Copy Markdown
Collaborator

@stephenxs stephenxs commented Oct 11, 2025

What I did

Fetch capability of ingress/egress mirror before configuring it and avoid configuring ingress/egress mirror on a platform that does not support it.

How I did it

Check the capability in PORT_INGRESS_MIRROR_CAPABLE and PORT_EGRESS_MIRROR_CAPABLE in STATE_DB table SWITCH_CAPABILITY.
The capability of ingress/egress mirror is inserted to STATE_DB by orchagent during initialization.

How to verify it

Manual test and unit test

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants